Skip to content

Resolve Ruff lint violations - #40

Open
strohganoff wants to merge 4 commits into
feature/await-settings-responsesfrom
refactor/ruff-cleanup
Open

strohganoff wants to merge 4 commits into
feature/await-settings-responsesfrom
refactor/ruff-cleanup

Conversation

@strohganoff

@strohganoff strohganoff commented Dec 4, 2026 •

Copy link
Copy Markdown
Owner

Incremental Ruff cleanup, stacked on #36.

Changes

  • Apply Ruff 0.17.3 safe automatic fixes (18 net diagnostics resolved).
  • Resolve selected manual violations: N806 (6), F841 (2), RUF005 (2), PT018 (1), PTH123 (1), SIM105 (1).
  • Temporarily ignore ERA001 globally (5 diagnostics) and exempt INP001 under tests/data/ (3 diagnostics).
  • Add all 53 missing test parameter annotations (ANN001), using concrete fixture and parameter types.
  • Resolve ANN401 and PLW1510; globally exempt EM101, EM102, TRY003 and FIX002; exempt PLC0415 and PLR2004 in tests and A005 in streamdeck/types.py. Add targeted noqa directives for intentional debugpy usage, asynchronous test iteration, controlled subprocess execution and concise CLI error logging.

Validation

  • Fresh Ruff 0.17.3 run: 268 → 215 diagnostics after the annotation commit; all ANN001 diagnostics resolved, no new rule counts introduced.
  • Latest Ruff 0.17.3 run: 215 → 151 diagnostics; all selected rules cleared, no new diagnostics. Total since baseline: 307 → 151.
  • Latest targeted local test run: 148 passed; git diff --check passed; remote modified blobs verified against local files. Mypy and full local suite unavailable in this environment.
  • Both affected test files passed locally (54 tests); full local suite collection is blocked by missing polyfactory. GitHub Actions runs the full Python matrix and packaging checks.
  • No blanket unsafe autofix, whole-file formatting, dependency updates, or additional lint configuration changes. LOG015 (5), T201 (4), PT019 (2), TRY301 (1), and 139 docstring diagnostics remain deferred.

Resolve N806, F841, RUF005, PT018, PTH123, and SIM105 with targeted edits. Temporarily ignore ERA001 globally and exempt INP001 for test resources under tests/data/.
@strohganoff
strohganoff force-pushed the refactor/ruff-cleanup branch from dbb6193 to 7e2829c Compare December 4, 2026 05:29
Annotate pytest fixtures and parametrized inputs in test_toml_settings.py and test_launch_settings.py, resolving all 53 ANN001 violations without changing test behavior or lint settings.
Allow intentional exception messages and TODOs, test-local imports and literal comparisons, and the qualified SDK types module. Preserve intentional debugger calls, asynchronous iteration, controlled subprocess invocation, and concise CLI validation errors with targeted exemptions. Replace two Any parameter annotations with JsonValue and Callable, and specify subprocess check=False.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant